<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>裹站-用户下载页</title>
  <link rel="stylesheet" href="css/style.css">
  <!-- Stylesheet -->
</head>

<body>
  <div class="link-btn"></div>
  <div class="user-bg"></div>
  <div class="link-btn">
    <a class="link-item item_one on" href="download-user.html"></a>
    <a class="link-item item_two" href="download-courier.html"></a>
    <a class="link-item item_mail" href="download-mail.html"></a>
    <a class="link-item item_help" href="download-help.html"></a>
  </div>
  <div class="user-download">
    <a class="user-item user-ios" href="url.html?action=user&phone=ios">
      <span class="user-code"><img src="images/user_ios_code.png" alt=""></span>
    </a>
    <a class="user-item user-android" href="url.html?action=user&phone=android">
      <span class="user-code"><img src="images/user_android_code.png" alt=""></span>
    </a>
  </div>
  <div class="tel-bg-user">
    <img src="images/bg_user_phone.png" alt="">
  </div>
  <!-- JavaScript -->
</body>
  <script>
    function getDeviceType() {
      var agent = navigator.userAgent
      var device = ''
      if (agent.indexOf('Android') !== -1) {
        device = 'Android'
      } else if (agent.indexOf('iPhone') !== -1) {
        device = 'iPhone'
      } else if (agent.indexOf('Windows') !== -1) {
        device = 'Windows'
      } else {
        device = 'iPhone'
      }
      return device
    }

    window.onload = function () {
      console.log('11111', getDeviceType())
      if (getDeviceType() === 'Android' || getDeviceType() === 'iPhone') {
        window.location = 'http://www.5ohome.com/download-for-phone.html'
      }
     }
  </script>
</html>
